﻿@model IEnumerable<OpenData.WebApp.ShCol>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Label)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ControlType)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.AllowNull)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Length)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Order)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Modifiable)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Indexable)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ShowInGrid)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Tooltip)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.SelectionFolder)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DefaultValue)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Summarize)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.IsSystemField)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Label)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ControlType)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.AllowNull)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Length)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Order)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Modifiable)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Indexable)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ShowInGrid)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Tooltip)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.SelectionFolder)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DefaultValue)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Summarize)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsSystemField)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
    </tr>
}

</table>
